package com.list.wildlife.beans;

import java.util.Arrays;
import java.util.List;

public enum OutputEnum {
	
	N3("N3", "n3"), TURTLE("TTL", "TURTLE"), N_Triple("N-TRIPLE", "NTRIPLE"), RDF_XML(
			"RDF/XML");
	
	private String[] names;

	private OutputEnum(String... names) {
		this.names = names;
	}
	
	public static OutputEnum forName(String format) {

		for (OutputEnum type : values()) {
			List<String> nameList = Arrays.asList(type.names);
			if (nameList.contains(format)) {
				return type;
			}
		}
		return null;
	}
}
